package com.teyao.teyao_back.controller;

import com.teyao.teyao_back.entity.UserView;
import com.teyao.teyao_back.service.UserViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/userview")
@CrossOrigin
public class UserViewController {

    @Autowired
    private UserViewService userViewService;

    //詹
    @GetMapping("/list")
    public List<UserView> list() {
        return userViewService.list();
    }


}
